package com.sunny.fetch.dao.common;

import java.util.HashMap;

/**
 * @Author: sublun
 * @Date: 2021/4/2 17:42
 */
public class DBContext extends HashMap {
    private DBConfig dbConfig;
    private DBContext(DBConfig dbConfig){
        this.dbConfig = dbConfig;
    }
    private static volatile DBContext dbContext;

    public static DBContext Init(DBConfig dbConfig) {
        if (dbContext == null) {
            synchronized (DBContext.class) {
                if (dbContext == null) {
                    dbContext = new DBContext(dbConfig);
                }
            }
        }
        return dbContext;
    }
}
